<?php

namespace App\Http\Controllers;

use App\Http\Resources\MintResource;
use App\Models\Mint;

class MintController extends Controller
{
    public function index()
    {
        $per_page = request()->input('per_page', 10);
        $mints = Mint::where('user_id', auth()->id())
            ->orderByDesc('id')
            ->paginate($per_page);

        return MintResource::collection($mints);
    }
}
